/*
 * @Description:
 * @Author: HYH
 * @LastEditors: HYH
 * @LastEditTime: 2023-07-12 16:42:03
 */
import request from '@/utils/request'



/**计算最终支付金额 */
export function calcFinallyAmount(data) {
  return request({
    url: '/distribution/bill/calcFinallyAmount',
    method: 'post',
    data,
    repetitiveConfig: {
      neglectful: true,
      interval: 3000
    }
  })
}

/**卖家批量提前付款 */
export function batchSellerBeforePay(data) {
  return request({
    url: '/system/skuSellerApply/batchSellerBeforePay',
    method: 'post',
    data
  })
}


/**库存不足列表：批量提前付款信息接口 */
export function stockNotEnoughBatchBeforePay(data) {
  return request({
    url: '/distribution/orderBatch/stockNotEnoughBatchBeforePay',
    method: 'post',
    data
  })
}


// 查询卖家申请流程记录列表
export function getSkuSellerApplyList(query) {
  return request({
    url: '/system/skuSellerApply/getSkuSellerApplyList',
    method: 'get',
    params: query
  })
}

// 卖家退回SKU库存
export function sellerBackSku(data) {
  return request({
    url: '/system/skuSellerApply/sellerBackSku',
    method: 'post',
    data: data
  })
}


// 卖家提前付款
export function sellerBeforePay(data) {
  return request({
    url: '/system/skuSellerApply/sellerBeforePay',
    method: 'post',
    data: data
  })
}
// 统一支付
export function toPay(data) {
  return request({
    url: '/pay/toPay',
    method: 'post',
    data: data
  })
}

// 获取收银台列表
export function payCashierConfig(query) {
  return request({
    url: '/admin/payCashierConfig/list',
    method: 'get',
    params: query
  })
}


/**删除卖家申请 */
export function delSkuSellerApply(ids) {
  return request({
    url: '/system/skuSellerApply/' + ids,
    method: 'delete',
  })
}

/**手动确认提前付款--目前仅测试用 */
export function handBeforePay(data) {
  return request({
    url: '/system/skuSellerApply/handBeforePay',
    method: 'post',
    data
  })
}


/**手手动确认批量提前付款 */
export function handBatchBeforePay(data) {
  return request({
    url: '/system/skuSellerApply/handBatchBeforePay',
    method: 'post',
    data
  })
}



/**批量提前付卖家线下支付 */
export function sellerBatchBeforeOfflinePay(data) {
  return request({
    url: '/system/skuSellerApply/sellerBatchBeforeOfflinePay',
    method: 'post',
    data
  })
}
/** 一积分支付确认接口*/
export function sellerPointPay(data) {
  return request({
    url: '/distribution/bill/sellerPointPay',
    method: 'post',
    data
  })
}
